import java.util.Scanner;

public class protice25 {
    public static void main(String[] args) {
        /**
         * 从键盘上输入5句话，逆序输出
         */

        Scanner sc = new Scanner(System.in);
        String []arr = new String[5];
        for (int i = 0; i <= arr.length-1 ; i++) {
            System.out.println("请输入第"+(i+1)+"句话");
            arr[i] = sc.next();
        }
        for (int i = arr.length-1; i >0 ; i--) {
            System.out.println(arr[i]);
        }

    }
}
